package com.tuozixuan.example1;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.statemachine.StateMachine;
import org.springframework.stereotype.Component;

import com.tuozixuan.example1.constant.Events;
import com.tuozixuan.example1.constant.States;

@Component
public class Test implements CommandLineRunner {
	
	@Autowired
	private StateMachine<States, Events> stateMachine;

	@Override
	public void run(String... args) throws Exception {
		 stateMachine.sendEvent(Events.E1);
		 stateMachine.sendEvent(Events.E2);
	}

}
